<!-- 会员中心主内容区 -->
<div class="page-article">
    <!-- 我的订单 -->
    <div class="member_welhead"><ins></ins><b><{t}>Подробнее о заказе<{/t}> </b> </div>
    <div id="member_order" class="member-order">
        <div class="member-notice">
            <div class="member-notice-content">
                <div class="member-order-desc">
                    <{if $order.pre_order == 'true'}>
                    <{t}>订单号<{/t}>：<i class="text-warn"><{$order.order_id}></i>
                    (<{t}>预售订单号<{/t}>：<i class="text-warn"><{$order.pre_number}></i>)
                    <{if $order.first_date}>
                    <p class="mar-t-5-b-3">
                        <span><{t}>预售商品最早到货日期<{/t}> <b><{$order.first_date}></b></span >
                        <span class='line-center'></span>
                        <span><b><{$order.last_date}></b></span>
                    </p>
                    <{/if}>
                    <p class="mar-t-5-b-3">
                        <{else}>
                        <{t}>订单号<{/t}>：<i class="text-warn"><{$order.order_id}></i>
                        <{/if}>
                        <{t}>订单金额<{/t}>：<i class="text-warn"><{$order.total_amount|cur_odr:$order.currency}></i>
                        <div class="mar-t-10">
                            <{t}>订单状态<{/t}>：<b><{if $order.status == 'dead'}><{t}>已作废<{/t}><{elseif $order.status == 'finish'}><{t}>已完成<{/t}><{else}><{if $order.pay_status == '0'}><{t}>未付款<{/t}><{elseif $order.pay_status == '1'}><{t}>已支付<{/t}><{elseif $order.pay_status == '2'}><{t}>已付款至担保方<{/t}><{elseif $order.pay_status == '3'}><{t}>部分付款<{/t}><{elseif $order.pay_status == '4'}><{t}>部分退款<{/t}><{else}><{t}>全额退款<{/t}><{/if}> <{if $order.ship_status == '0'}><{t}>[未发货]<{/t}><{elseif $order.ship_status == '1'}><{t}>已发货<{/t}><{elseif $order.ship_status == '2'}><{t}>部分发货<{/t}><{elseif $order.ship_status == '3'}><{t}>部分退货<{/t}><{else}><{t}>已退货<{/t}><{/if}><{/if}></b>
                        </div>
                    </p>
                </div>

              <!--  <div class="member-order-actions">
                    <{if $order.payinfo.pay_app_id != '-1'}>
                    <{if ($order.pay_status == '0' || $order.pay_status == '3') && $order.status != 'dead' && $order.status != 'finish'}>
                    <{if $order.payinfo.pay_app_id != 'offline'}>
                    &lt;!&ndash;普通商品 &ndash;&gt;
                    <{if $prepare.prepare_type != 'prepare' && $order.c_status=='2'}>
                    <a href="<{link app=b2c ctl=site_paycenter arg0=$order.order_id}>" class="btn btn-xs btn-default"><span><span><{t}>去付款<{/t}></span></span></a>
                    <{/if}>
                    &lt;!&ndash;预售商品判断&ndash;&gt;
                    <{if $prepare.prepare_type == 'prepare' && $prepare.nowtime > $prepare.begin_time && $prepare.nowtime < $prepare.end_time  && $order.pay_status=='0' && $prepare.status=='true'}>
                    <a href="<{link app=b2c ctl=site_paycenter arg0=$order.order_id}>" class="btn btn-xs btn-default"><span><span><{t}>去付订金<{/t}></span></span></a>
                    <{/if}>
                    <{if $prepare.prepare_type == 'prepare'&& $prepare.nowtime > $prepare.begin_time && $prepare.nowtime < $prepare.begin_time_final  && $order.pay_status=='3' && $prepare.status=='true'}>
                    <a href="#" class="btn btn-xs btn-default"><span><span><{t}>等待支付尾款<{/t}></span></span></a>
                    <{/if}>


                    <{if $prepare.prepare_type == 'prepare'&& $prepare.nowtime > $prepare.begin_time_final && $prepare.nowtime < $prepare.end_time_final  && $order.pay_status=='3' && $prepare.status=='true'}>
                    <a href="<{link app=b2c ctl=site_paycenter arg0=$order.order_id}>" class="btn btn-xs btn-default"><span><span><{t}>支付尾款<{/t}></span></span></a>
                    <{/if}>

                    <{if $prepare.prepare_type == 'prepare'&& $prepare.nowtime > $prepare.end_time_final && $prepare.status=='true'}>
                    <a href="#" class="btn btn-xs btn-default"><span><span><{t}>活动结束<{/t}></span></span></a>
                    <{/if}>


                    &lt;!&ndash;  <a href="<{link app=b2c ctl=site_paycenter arg0=$order.order_id}>" class="btn btn-xs btn-default"><span><span><{t}>修改支付方式<{/t}></span></span></a>&ndash;&gt;
                    <{else}>
                    <a href="javascript:void(0);" class="btn btn-xs btn-default action-paid"><span><span><{t}>我已付款<{/t}></span></span></a>
                    &lt;!&ndash;  <a href="<{link app=b2c ctl=site_paycenter arg0=$order.order_id}>" class="btn btn-xs btn-default"><span><span><{t}>修改支付方式<{/t}></span></span></a>&ndash;&gt;
                    <div id="member_already_paid" style="display:none;">
                        <form action='<{link app=b2c ctl="site_member" act="toadd_order_msg"}>' method="post" class="member-already-paid">
                            <input type="hidden" name="msg[orderid]" value="<{$order.order_id}>"/>
                            <input type="hidden" name="msg[msgType]" value="1"/>
                            <div class="form-group">
                                <label for=""><em class="warn">*</em> <{t}>付款金额<{/t}>：</label>
                                <input type="text" name="msg[paymoney]" id="" class="x-input form-control" vtype="required">
                            </div>
                            <div class="form-group">
                                <label for=""><em class="warn">*</em> <{t}>付款方式<{/t}>：</label>
                                <input type="text" name="msg[payments]" id="" class="x-input form-control" vtype="required">
                            </div>
                            <div class="form-group">
                                <div class="row">
                                    <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <label for=""><em class="warn">*</em> <{t}>付款时间<{/t}>：</label><{input type="datepicker" name="msg[paydate][]" vtype="required" class="form-control" style="background-color: #FFF;"}>
                                    </div>
                                    <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <label for=""><{t}>时<{/t}>：</label>
                                        <{input type="select" name="msg[paydate][]" options=$timeHours}>&lt;!&ndash;&ndash;&gt;
                                    </div>
                                    <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <label for=""><{t}>分<{/t}>：</label>
                                        <{input type="select" name="msg[paydate][]" options=$timeMins}>&lt;!&ndash;&ndash;&gt;
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for=""><{t}>备注<{/t}>：</label>
                                <textarea name="msg[message]" id="" cols="30" rows="5" class="x-input form-control"></textarea>
                            </div>
                            <div class="form-group">
                                <label for=""></label><span class="form-act"><button type="submit" class="btn btn-primary pull-right" rel="_request"><span><span><{t}>确　定<{/t}></span></span></button></span><div class="clearfix"></div>
                            </div>
                        </form>
                    </div>
                    <{/if}>
                    <{/if}>
                    <{if !$archive}>
                    <button type="button" class="btn btn-xs btn-default action-leave-message"><span><span><{t}>我要留言<{/t}></span></span></button>
                    &lt;!&ndash; 我要留言弹框 &ndash;&gt;
                    <div id="member_message_box" style="display:none;">
                        <form action='<{link app=b2c ctl="site_member" act="toadd_order_msg"}>' class="member-message-box" method="post">

                            <div class="form-group">
                                <label><{t}>标题<{/t}>：</label>
                                <input type="text" name="msg[subject]" id="" vtype="required" class="x-input form-control">
                            </div>
                            <div class="form-group">
                                <label><{t}>内容<{/t}>：</label>
                                <textarea name="msg[message]" id="" vtype="required" cols="30" rows="6" class="x-input form-control"></textarea>
                            </div>
                            <div class="form-group">
                                <button type="submit" class="btn btn-primary pull-right action-submit-message" rel="_request"><span><span><{t}>提交留言<{/t}></span></span></button>
                                <div class="clearfix"></div>
                            </div>

                            <input type="hidden" name="msg[orderid]" value="<{$order.order_id}>"/>
                        </form>
                    </div>
                    <{/if}>
                    <{/if}>
                </div>
            </div>-->
            <div class="member-notice-content padd-t-0">
                <div class="caption"order>
                    <{if $order.status=='finish'}>
                    <p class="bg-success" style="padding: 5px;"><{t}>订单已经处理完成。<{/t}></p>
                    <{elseif $order.status=='dead'}>
                    <{t}>订单已经作废。<{/t}>
                    <{else}>
                    <{if ($order.pay_status == 0 || $order.pay_status == 3) && $order.ship_status == 0}>
                    <{if $order.payinfo.pay_app_id == 'offline'}>
                    <{t}>说明：您选择了<{/t}><b><{t}><{$order.payment.app_name}><{/t}></b><{t}>付款，请尽快付款，付款后可通过网站留言联系我们。<{/t}>
                    <{elseif $order.payinfo.pay_app_id == '-1'}>
                    <{t}>说明：您选择了<b>货到付款</b>，请等待店家发货。<{/t}>
                    <{else}>
                    <{t}>说明：您选择了<{/t}><b><{t}><{$order.payment.app_name}><{/t}></b><{t}>付款，请尽快付款。<{/t}>
                    <{/if}>
                    <{elseif ($order.pay_status == 1 || $order.pay_status==2) && $order.ship_status == 0}>
                    <{t}>说明：你已支付成功，商家正在为你备货！<{/t}>
                    <{elseif $order.ship_status==1}>
                    <{t}>说明：店家已经发货。<{/t}>
                    <{elseif $order.pay_status=='5' && $order.ship_status != '4'}>
                    <{t}>说明：店家已经退款<{/t}>
                    <{$order.total_amount|cur_odr:$order.currency}><{t}>(说明：金额数字)，请注意查看您的支付账户。<{/t}>
                    <{elseif $order.ship_status == '4' && $order.pay_status!='5'}>
                    <{t}>说明：店家已经处理退货<{/t}>
                    <{elseif $order.pay_status=='5' && $order.ship_status== '4'}>
                    <{t}>说明：店家已经退款<{/t}><{$order.total_amount|cur_odr:$order.currency}><{t}>(说明：金额数字)，请注意查看您的支付账户。<{/t}><br /><{t}>店家已经处理退货<{/t}>
                    <{elseif $order.pay_status=='4'}>
                    <{t}>说明：店家已经退款部分，请确认是否已经收到部分退款项！<{/t}>
                    <{/if}>
                    <{if $order.payment.app_info && $order.payment.app_info != '&nbsp;'}>
                    <!-- 支付说明 -->
                    <{if $order.payment.app_des}>
                    <a href="javascript:void(0);" class="action-payment-guide"><{t}>支付说明<{/t}></a>
                    <div id="payment_guide" style="display:none;">
                        <h3 class="title"><{$order.payment.app_display_name}></h3>
                        <p><{$order.payment.app_des}></p>
                    </div>
                    <{/if}>
                    <{/if}>
                    <{/if}>
                </div>
                <div class="steps member-order-steps table-responsive">
                    <table width="100%">
                        <tbody>
                        <tr>
                            <td class="step-item step-1 active"><span><q class="icon">&#x50;</q><i>1</i><{t}>Принят<{/t}></span></td>
                            <{if $order.status=='dead'}>
                            <td class="icon step-arrow">&#x28;</td>
                            <td class="step-item step-1 active"><span><q class="icon">&#x50;</q><i>2</i><{t}>Завершен<{/t}></span></td>
                            <{else}>
                            <{if $order.payinfo.pay_app_id != '-1'}>
                            <td class="icon step-arrow">&#x28;</td>
                            <td class="step-item step-2 <{if $order.pay_status == 1 || $order.pay_status==2}> active <{/if}>"><span><q class="icon">&#x50;</q><i>2</i><{t}>Оплачен<{/t}></span></td>
                            <{/if}>
                            <td class="icon step-arrow">&#x28;</td>
                            <td class="step-item step-3 <{if $order.ship_status == '1'}>active<{/if}>"><span><q class="icon">&#x50;</q><i>3</i><{t}>Отгружен<{/t}></span></td>
                            <td class="icon step-arrow">&#x28;</td>
                            <td class="step-item step-4 <{if $order.status == 'finish'}>active<{/if}>"><span><q class="icon">&#x50;</q><i>4</i><{t}>Завершен<{/t}></span></td>
                            <{/if}>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <{if $orderlogs}>
                <{include file="site/member/order_logs.html" app="b2c"}>
                <{/if}>
            </div>
        </div>

        <!-- 订单留言 -->
        <{if $ordermsg}>
        <div id="member_order_message" class="member-order-message member-mod">
            <div class="member-mod-title">
                <h2><{t}>订单留言<{/t}></h2>
            </div>
            <div class="member-mod-content">
                <ul>
                    <{foreach from=$ordermsg item=msgitem name="ordermsg"}>
                    <li class="<{if $smarty.foreach.ordermsg.iteration == 1}>first<{/if}>">
                        <div class="message-infos"><span class="admin-name"><{$msgitem.author}></span><span class="datetime"><{$msgitem.time|cdate:FDATE_STIME}></span></div>
                        <div class="message-section">
                            <h4 class="message-title"><{$msgitem.title}></h4>
                            <div class="message-text">
                                <p><{$msgitem.comment|nl2br}></p>
                            </div>
                        </div>
                    </li>
                    <{/foreach}>
                </ul>
            </div>
        </div>
        <{/if}>

        <!-- 订单信息区 -->
        <div id="order_main" class="order-main order-container" style="clear:none;">
            <!-- 收货信息模块 -->
            <div id="order_shipping" class="order-section order-shipping">
                <div class="order-section-title"><b><{t}>收货信息<{/t}></b></div>
                <div class="order-section-content table-responsive">
                    <!-- 完整收货信息 -->
                    <table class="view-shipping table table-bordered table-striped table-hover">
                        <tbody>
                        <tr>
                            <th><em>*</em><{t}>收货地区<{/t}><{t}>：<{/t}></th>
                            <td><{$order.consignee.area}></td>
                        </tr>
                        <tr>
                            <th><em>*</em><{t}>收货地址<{/t}><{t}>：<{/t}></th>
                            <td><{$order.consignee.addr}></td>
                        </tr>
                        <{if $order.consignee.zip}>
                        <tr>
                            <th><{t}>邮编<{/t}><{t}>：<{/t}></th>
                            <td><{$order.consignee.zip}></td>
                        </tr>
                        <{/if}>
                        <tr>
                            <th><em>*</em><{t}>收货人姓名<{/t}><{t}>：<{/t}></th>
                            <td><{$order.consignee.name}></td>
                        </tr>
                        <{if $order.consignee.mobile}>
                        <tr>
                            <th><{t}>手机<{/t}><{t}>：<{/t}></th>
                            <td><{$order.consignee.mobile}></td>
                        </tr>
                        <{/if}>
                        <{if $order.consignee.telephone}>
                        <tr>
                            <th><{t}>固定电话<{/t}><{t}>：<{/t}></th>
                            <td><{$order.consignee.telephone}></td>
                        </tr>
                        <{/if}>
                        <!--<tr>
                          <th>送货时间<{t}>：<{/t}></th>
                          <{if $order.consignee.r_time}>
                          <td><{$order.consignee.r_time}></td>
                          <{else}>
                          <td>任意时间，任意时间段</td>
                          <{/if}>
                        </tr>-->
                        </tbody>
                    </table>
                </div>
            </div>

            <!-- 付款人信息区 -->
            <div id="order_pay" class="order-main order-container" style="clear:none;">
                <!-- 收货信息模块 -->
                <div id="order_shipping" class="order-section order-shipping">
                    <div class="order-section-title"><b><{t}>付款单位信息<{/t}></b></div>
                    <div class="order-section-content table-responsive">
                        <!-- 完整收货信息 -->
                        <table class="view-shipping table table-bordered table-striped table-hover">
                            <tbody>
                            <tr>
                                <th><em>*</em><{t}>类型<{/t}><{t}>：<{/t}></th>
                                <td><{$order.company_c_type}></td>
                            </tr>
                            <tr>
                                <th><em>*</em><{t}>税务号<{/t}><{t}>：<{/t}></th>
                                <td><{$order.company_taxno}></td>
                            </tr>
                            <!--<tr>
                              <th>送货时间<{t}>：<{/t}></th>
                              <{if $order.consignee.r_time}>
                              <td><{$order.consignee.r_time}></td>
                              <{else}>
                              <td>任意时间，任意时间段</td>
                              <{/if}>
                            </tr>-->
                            </tbody>
                        </table>
                    </div>
                </div>

                <!-- 配送方式模块 -->
                <div id="order_delivery" class="order-section order-delivery">
                    <div class="order-section-title"><b><{t}>配送方式<{/t}></b></div>
                    <div class="order-section-content table-responsive">
                        <table class="view-delivery  table table-bordered table-striped table-hover">
                            <tbody>
                            <tr>
                                <th><{t}>配送方式<{/t}><{t}>：<{/t}></th>
                                <td><{t}><{$order.shipping.shipping_name}><{/t}></td>
                            </tr>
                            <tr>
                                <th><{t}>运费<{/t}><{t}>：<{/t}></th>
                                <td><{$order.shipping.cost_shipping|cur_odr:$order.currency}></td>
                            </tr>
                            <{if order.shipping.is_protect == 'true'}>
                            <tr>
                                <th><{t}>其它服务<{/t}><{t}>：<{/t}></th>
                                <td><{t}>物流保价<{/t}></td>
                            </tr>
                            <{/if}>
                            </tbody>
                        </table>
                    </div>
                </div>

                <!-- 支付方式模块 -->
                <div id="order_payment" class="order-section order-payment">
                    <div class="order-section-title"><b><{t}>支付方式<{/t}></b></div>
                    <div class="order-section-content table-responsive" style="border-bottom:1px solid #E6E6E6;">
                        <table class="view-payment table table-bordered table-striped table-hover">
                            <tbody>
                            <tr>
                                <th><{t}>支付方式<{/t}><{t}>：<{/t}></th>
                                <td><{t}><{$order.payment.app_display_name}><{/t}></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <{if $order.is_tax == 'true' && $order.tax_type != 'false'}>
                <!-- 发票信息模块 -->
                <div id="order_invoice" class="order-section order-invoice">
                    <div class="order-section-title"><b><{t}>发票信息<{/t}></b></div>
                    <div class="order-section-content table-responsive">
                        <table class="view-invoice table table-bordered table-striped table-hover">
                            <tbody>
                            <tr>
                                <th><{t}>发票类型<{/t}><{t}>：<{/t}></th>
                                <td><{if $order.tax_type=='personal'}><{t}>个人<{/t}><{else}><{t}>公司<{/t}><{/if}><{t}>发票<{/t}></td>
                            </tr>
                            <tr>
                                <th><{t}>发票抬头<{/t}><{t}>：<{/t}></th><td><{$order.tax_title}></td>
                            </tr>
                            <tr>
                                <th><{t}>发票内容<{/t}><{t}>：<{/t}></th><td><{$order.tax_content}></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <{/if}>

                <!-- 商品清单 -->
                <div class="order-section table-responsive">
                    <div class='order-section-title'><b><{t}>清单和结算信息<{/t}></b></div>
                    <div class="order-section-content">
                        <table id="cart_main" class="cart-main table table-bordered table-striped table-hover" width="100%">

                             <!-- <colgroup>
                                <col class="col-2">
                                <col class="col-3">
                                <col class="col-4">
                                <col class="col-5">
                                <col class="col-6">
                                <col class="col-7">
                            </colgroup>-->
                            <thead>
                            <tr>
                                <th colspan="2"><{t}>商品<{/t}></th>
                                <th><{t}>Цена за ед.<{/t}></th>
								<th>Кол-во в уп.</th>
                                <th><{t}>Цена за уп.<{/t}></th>
								<th>Наполнение короба</th>
                                <th><{t}>数量<{/t}></th>
                                <{if $business_orders_amount != $order.cost_item}>
                                <th><{t}>确认数量<{/t}></th>
                                <{/if}>
                                <th><{t}>优惠金额<{/t}></th>
                                <!-- <th><{t}>积分<{/t}></th>-->
                                <th><{t}>小计<{/t}></th>
                            </tr>
                            </thead>
                            <tbody>
                            <{foreach from=$order.goods_items item="item" key="key"}>
                            <{if $item.product}>
                            <!-- 购物车条目 -->

                            <!-- 主商品 -->
                            <tr class="cart-product">
                                <td>
                                    <div class="p-pic">
                                        <a target="_blank" href="<{$item.product.link_url}>"><img src="<{$item.product.thumbnail_pic|storager:'s'}>"></a>
                                    </div>
                                </td>
                                <td class="p-info">
                                    <div class="p-title"><a href="<{$item.product.link_url}>" target="_blank"><{$item.product.name}>
                                        <{foreach from=$item.product.minfo item=minfo key=name}>
                                        ，<{$minfo.value}>
                                        <{/foreach}></a>
                                        <!--货号-->
                                        <div class="item-vendor-code colsix"><{$item.product.bn}></div>
                                    </div>
                                </td>
                                <!--  单价-->
                                <td class="p-price"><{$item.product.one_price}> руб.</td>
								<td><{$item.product.unit_num}></td>
                                <td class="p-price"><{$item.product.sale_price|cur_odr:$order.currency}></td>
								<td>
									<div class="table-responsive">
										<table class="table table-hover table-striped table-condensed table-bordered">
											<thead>
												<tr class="small">
												<{foreach from=$item.product.params key=p_key item=p_item}>
													<th><{$p_key}></th>
												<{/foreach}>	
												</tr>
											</thead>
											<tbody>
												<tr class="small">
												<{foreach from=$item.product.params key=p_key item=p_item}>
													<td><{$p_item}></td>
												<{/foreach}>
												</tr>
											</tbody> 
										</table>
									</div>
								</td>

                                <{if $business_orders_amount != $order.cost_item}>
                                <td class="quantity"><{$item.product.quantity}></td>
                                <td class="has_confirm_num"><{$item.product.has_confirm_num}></td>
                                <{else}>
                                <td><{$item.product.quantity}></td>
                                <{/if}>
                                <td class="p-discount"><{$item.product.goods_discount|cur_odr:$order.currency}></td>
                                <!--<td class="p-discount"><{($item.product.g_price-$item.product.price)*$item.product.quantity|cur_odr:$order.currency}></td>-->
                                <!--  积分-->
                                <!--<td class="p-integral"><{if $item.product.score}><{$item.product.score}><{else}>-<{/if}></td>-->
                                <td class="p-subtotal"><{$item.product.amount|cur_odr:$order.currency}></td>
                            </tr>
                            <!--非预售判断-->
                            <{if $prepare.prepare_type != 'prepare'}>
                            <!-- 赠品 -->
                            <{if $item.gift_items}>
                            <{foreach from=$item.gift_items item=gifts name="giftsItem"}>
                            <tr class="p-gift">
                                <td class="p-info">
                                    <b>[<{t}>赠品<{/t}>]</b>
                                    <a href="<{$gifts.link_url}>" target="_blank">
                                        <{$gifts.name}>
                                        <{foreach from=$gifts.minfo item=minfo key=name}>
                                        <br>，<{$minfo.value}>
                                        <{/foreach}>
                                    </a>
                                </td>
                                <td class="p-price"><{$gifts.products.price.price.price|cur_odr:$order.currency}></td>
                                <td class="p-num"><{$gifts.quantity}></td>
                                <td colspan="3"></td>
                            </tr>
                            <{/foreach}>
                            <{/if}>
                            <{/if}>

                            <!--非预售判断-->
                            <{if $prepare.prepare_type != 'prepare'}>
                            <!-- 商品促销 -->
                            <{if $order.goods_pmt.[$item.product.products.product_id]}>
                            <tr>
                                <td class="p-promotion" colspan="<{if $business_orders_amount != $order.cost_item}>7<{else}>6<{/if}>">
                                    <ul>
                                        <{foreach from=$order.goods_pmt.[$item.product.products.product_id] item=goods_pmt_row}>
                                        <li>
                                            <b>
                                                <!-- [<{$goods_pmt_row.pmt_tag}>]-->
                                                [Акция]
                                            </b>
                                            <{$goods_pmt_row.pmt_memo}>


                                        </li>
                                        <{/foreach}>
                                    </ul>
                                </td>
                            </tr>
                            <{/if}>
                            <{/if}>
                            <!-- 配件 -->
                            <{if  $item.adjunct_items}>
                            <{foreach from=$item.adjunct_items item=ajuncts name="ajunctsItem"}>
                            <tr class="p-adjunct">
                                <td class="p-info">
                                    <div class="p-title"><b>[<{t}>配件商品<{/t}>]</b>
                                        <a href="<{$ajuncts.link_url}>" target="_blank">
                                            <{$ajuncts.name}>
                                            <{foreach from=$ajuncts.minfo item=minfo key=name}>
                                            <br>，<{$minfo.value}>
                                            <{/foreach}>
                                        </a></div>
                                </td>
                                <td class="p-price"><{$ajuncts.price|cur_odr:$order.currency}></td>
                                <td><{$ajuncts.quantity}></td>
                                <td class="p-discount"></td>
                                <td class="p-integral"><{if $ajuncts.score}><{$ajuncts.score}><{else}>-<{/if}></td>
                                <td class="p-subtotal"><{$ajuncts.amount|cur_odr:$order.currency}></td>
                            </tr>
                            <{/foreach}>
                            <{/if}>

                            <{/if}>
                            <{/foreach}>


                            <!--非预售判断-->
                            <{if $prepare.prepare_type != 'prepare'}>
                            <{if $order.gift.gift_items}>
                            <!-- 积分兑换 -->

                            <tr class="cart-subtitle">
                                <th colspan="6"><{t}>积分兑换赠品<{/t}></th>
                            </tr>
                            <{foreach from=$order.gift.gift_items item=cart_gift}>
                            <tr class="cart-item">
                                <td class="p-info">
                                    <div class="p-title"><a target="_blank" href="<{$cart_gift.link_url}>"><{$cart_gift.name}><{if $cart_gift.attr}>(<{$cart_gift.attr}>)<{/if}></a></div>
                                </td>
                                <td class="p-price"><{$cart_gift.price|cur_odr}></td>
                                <td class="p-num"><{$cart_gift.quantity}></td>
                                <td>-</td>
                                <td class="p-integral">-<{$cart_gift.point}></td>
                                <td>-</td>
                            </tr>
                            <{/foreach}>

                            <{/if}>
                            <{/if}>


                            <!--非预售判断-->
                            <{if $prepare.prepare_type != 'prepare'}>
                            <{if $order.order.gift_items}>
                            <!-- 订单送赠品 包含优惠券送赠品-->
                            <tr class="cart-subtitle">
                                <th colspan="6"><{t}>订单送赠品<{/t}></th>
                            </tr>
                            <{foreach from=$order.order.gift_items item=cart_gift}>
                            <tr class="cart-item">
                                <td class="p-info">
                                    <div class="p-title"><a target="_blank" href="<{$cart_gift.link_url}>"><{$cart_gift.name}><{if $cart_gift.attr}>(<{$cart_gift.attr}>)<{/if}></a></div>
                                </td>
                                <td class="p-price"><{$cart_gift.price|cur_odr}></td>
                                <td class="p-num"><{$cart_gift.quantity}></td>
                                <td>-</td>
                                <td class="p-integral">-</td>
                                <td>-</td>
                            </tr>
                            <{/foreach}>

                            <{/if}>
                            <{/if}>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <{if $order.extends}>
            <{foreach from=$order.extends item=aExtend name="aExtends"}>
            <{$aExtend}>
            <{/foreach}>
            <{/if}>
            <!-- 结算信息 -->
            <div class="table-responsive">
                <table id="order_clearing" class="order-clearing order-clearing-info table table-bordered table-hover table-striped">
                    <tbody>
                    <tr>
                        <td class="order-infor">
                            <!--非预售判断-->
                            <{if $prepare.prepare_type != 'prepare'}>
                            <!-- 订单优惠 -->
                            <{if $order.order_pmt}>
                            <div class="order-promotion">
                                <h3><{t}>订单优惠<{/t}><{t}>：<{/t}></h3>
                                <ul class="content">
                                    <{foreach from=$order.order_pmt item=order_pmt_row}>
                                    <li>
                                        <b>
                                            <!--[<{$order_pmt_row.pmt_tag}>]-->
                                            [Акция]
                                        </b>
                                        <{$order_pmt_row.pmt_memo}>
                                    </li>
                                    <{/foreach}>
                                </ul>
                            </div>
                            <{/if}>
                            <{/if}>
                            <h3><{t}>订单备注<{/t}><{t}>：<{/t}></h3> <p><{$order.memo|default:$___b2c='暂无附言'|t:'b2c'}></p>
                        </td>
                        <!-- 订单价格 -->
                        <td id="order_price" class="order-price">
                            <div class="inner">

                                <{if $business_orders_amount != $order.cost_item}>
                                <div class="item-price">
                                    <b><{t}>原商品总金额<{/t}><{t}>：<{/t}></b>&nbsp;
                                    <span><s><{$business_orders_amount|cur_odr:$order.currency}></s></span>
                                </div>
                                <{/if}>


                                <div class="item-price">
                                    <b><{t}>商品总金额<{/t}><{t}>：<{/t}></b>&nbsp;
                                    <span><{$order.cost_item|cur_odr:$order.currency}></span>
                                </div>

                                <{if $order.order_refund>0}>
                                <div class="item-price">
                                    <b><{t}>缺货的金额<{/t}><{t}>：<{/t}></b>&nbsp;
                                    <span><{$order.order_refund|cur_odr:$order.currency}></span>
                                </div>
                                <{/if}>

                                <div class="item-price">
                                    <b><{t}>运费<{/t}><{t}>：<{/t}></b>&nbsp;
                                    <span><{$order.shipping.cost_shipping|cur_odr:$order.currency}></span>
                                </div>

                                <{if $order.shipping.is_protect == 'true' && $order.shipping.cost_protect > 0}>

                                <div class="item-price">
                                    <b><{t}>保价费用<{/t}><{t}>：<{/t}></b>&nbsp;
                                    <span><{$order.shipping.cost_protect|cur_odr:$order.currency}></span>
                                </div>

                                <{/if}>
                                <{if $order.payinfo.cost_payment > 0}>
                                <div class="item-price">
                                    <b><{t}>支付费用<{/t}><{t}>：<{/t}></b>&nbsp;
                                    <span><{$order.payinfo.cost_payment|cur_odr:$order.currency}></span>
                                </div>

                                <{/if}>
                                <{$discount_html}>

                                <div class="item-price">
                                    <b><{t}>订单优惠金额<{/t}><{t}>：<{/t}></b>&nbsp;
                                    <span>-<{$order.pmt_order|cur_odr:$order.currency}></span>
                                </div>

                                <{if $order.cost_payment > 0}>


                                <div class="item-price">
                                    <b><{t}>客户承担支付手续费<{/t}><{t}>：<{/t}></b>&nbsp;
                                    <span><{$order.cost_payment|cur_odr:$order.currency}></span>
                                </div>

                                <{/if}>
                                <{if $order.cost_tax>0}>

                                <div class="item-price">
                                    <b><{t}>开发票所需税金<{/t}><{t}>：<{/t}></b>&nbsp;
                                    <span><{$order.cost_tax|cur_odr:$order.currency}></span>
                                </div>

                                <{/if}>
                                <div class="item-price padd-t-5">(<{t}>订单可得积分<{/t}><{$order.score_g|round:0}>)</div>
                                <div class="total item-price noline">
                                    <b><{t}>总金额：<{/t}></b>&nbsp;
                                    <span><{$order.total_amount|cur_odr:$order.currency}></span>
                                </div>

                                <{if $order.payed > 0}>

                                <div class="item-price">
                                    <b><{t}>已付金额:<{/t}></b>&nbsp;
                                    <span><{$order.payed|cur_odr:$order.currency:false:true}></span>
                                </div>

                                <{/if}>
                                <{if $order.cur_rate != 1}>


                                <div class="item-price">
                                    <b><{t}>货币汇率:<{/t}></b>&nbsp;
                                    <span><{$order.cur_rate}></span>
                                </div>

                                <div class="item-price">
                                    <b><{t}>货币结算金额:<{/t}></b>&nbsp;
                                    <span><{$order.cur_amount|cur_odr:$order.currency:false:true}></span>
                                </div>
                                <{/if}>

                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<script>
    Object.merge(validatorMap, {
        requiredcustom: function(element, v, type, parent){
            var name = element.name;
            if(!parent.getElements('input[type=' + type + ']' + name ? '[name="' + name + '"]' : '').some(function(el) {
                        return el.checked && el.value != '0';
                    })) {
                return showWarn(parent, element.get('data-validatemsg'));
            }
            return true;
        }
    });

    function hideWarn(el) {
        var tips = el.retrieve('tips_instance');
        tips && tips.hide();
    }

    //  ===============================列表页面图片变大效果=======================================================
    jQuery(".cart-main tr td .p-pic").hover(function(){
        var owntop=jQuery(window).height()-(jQuery(this).offset().top - jQuery(document).scrollTop()+50);
        var new_img= jQuery(this).clone();
        jQuery(this).parent().append(new_img);

        if(owntop>160){
            jQuery(this).siblings('.p-pic').addClass('letbig').stop().animate({width:160, height:160,top:58,left:60},0);
        }else{
            jQuery(this).siblings('.p-pic').addClass('letbig').stop().animate({width:160, height:160,top:-154,left:60},0);
        }
    },function(){
        jQuery(this).siblings('.p-pic').remove();
    });


    jQuery('.cart-product').each(function(){
        var quantity_val =  jQuery(this).find(".quantity").text();
        var has_confirm_num_val = jQuery(this).find('.has_confirm_num').text();
        if(has_confirm_num_val){
            if(quantity_val==has_confirm_num_val){
            }else{
                jQuery(this).find(".quantity").css('color','#acacac');
                jQuery(this).find('.has_confirm_num').css({'font-weight':'600','color':'#ffa601'});
            }
        }
    });



    function showWarn(el, msg) {
        formTips.warn(msg, el);
        return false;
    }

    $(document.body).addEvents({
        'mouseenter:relay(.pop-handle)': function(e){
            var menu = this.getNext('.pop-body');
            if(menu) {
                clearTimeout(menu.timer);
                menu.show();
            }
        },
        'mouseenter:relay(.pop-body)': function(e){
            clearTimeout(this.timer);
        },
        'mouseleave:relay(.pop-wrapper)': function(e) {
            var menu = this.getElement('.pop-body');
            menu.timer = menu.hide.delay(200,menu);
        },
        //= 我已付款
        'click:relay(.action-paid)': function(e) {
            var dialog = new Dialog($('member_already_paid').wrapped(true),{
                width:680,
                title: '<{t}>提交付款信息<{/t}>',
                modal: true,
                onLoad: function(){
                    bindDatepicker();
                },
                onClose: function(){
                    location.reload();
                }
            });
        },
        //= 我要留言
        'click:relay(.action-leave-message)': function (e) {
            var dialog = new Dialog($('member_message_box').wrapped(), {
                width: 450,
                title: '<{t}>我要留言<{/t}>',
                modal: true
            });
        },
        'click:relay(.action-payment-guide)': function(e) {
            Dialog.alert($('payment_guide').innerHTML, {
                width:500,
                title: '<{t}>支付详细说明<{/t}>',
                confirmText: '<{t}>关闭窗口<{/t}>'
            });
        }
    });


    function show_delivery_item(el,key,rs){
        var cont = $('order_' + key);
        var tpl = '<li><em><{t}>商品名称<{/t}><{t}>：<{/t}>{name}</em><i><{t}>数量<{/t}><{t}>：<{/t}>{number}</i></li>';
        var html = ['<li><b><{t}>本次发货商品：<{/t}></b></li>'];
        if(cont) {
            cont.setStyle('display', cont.isDisplayed() ? 'none' : '');
        }else{
            rs.each(function(item){
                html.push(tpl.substitute(item));
            });
            new Element('ul.notice-inline#order_' + key, {html: html.join('\r\n')}).inject(el.getParent());
        }
    }
    function show_logistics(el, key, url) {
        var cont = $('delivery_' + key);
        var html = ['<p><b><{t}>物流信息<{/t}><{t}>：<{/t}></b></p>'];
        if(cont) {
            cont.setStyle('display', cont.isDisplayed() ? 'none' : '');
        }else{
            new Request({
                url: url,
                link: 'ignore',
                onSuccess: function(rs) {
                    if(rs) {
                        html.push(rs);
                    }
                    new Element('div.notice-inline#delivery_' + key, {html: html.join('\r\n')}).inject(el.getParent());
                }
            }).send();
        }
    }
</script>
